﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>

    <a id="workerStarter" href="#">Start working</a>
    <div id="results" ></div>

    
    <script>
        var clickCount = 0,
            link,
            results;
        link = document.getElementById('workerStarter');
        results = document.getElementById('results');

        workerStarter.addEventListener('click', function () {
            var worker = new Worker('worker.js');
            worker.onmessage = function (event) {
                results.innerHTML = results.innerHTML + '<br />' + event.data;
            };
        });


    </script>
</body>
</html>
